package com.dalin.platform.log.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
/*****************************************************************************
 * @content: 类信息                                                                                                                                *
 * @author : 那建林                                                                                                                                 *
 * @crtDate: 2012-04-24 22:52:31                                            *
 * @modDate: 2012-04-24 22:52:31                                            *
 * @version: 1.00                                                           *
 ****************************************************************************/
@Entity
@Table(name="LOG_OPERATE_DETAIL")
public class LogOperateDetailEntity extends com.dalin.common.base.BaseObject {
    private String columnValue; // COLUMN_VALUE,4000,0,null
    private String tableKeyValue; // TABLE_KEY_VALUE,16,0,null
    private Integer fidelityType; // FIDELITY_TYPE,1,0,null
    private Long logOperateId; // LOG_OPERATE_ID,16,0,null
    private Long operateDetailId; // OPERATE_DETAIL_ID,16,0,null
    private Long columnId; // COLUMN_ID,16,0,null





    @Column(name="COLUMN_VALUE")
    public String getColumnValue() {
        return columnValue;
    }

    public void setColumnValue(String columnValue) {
        this.columnValue = columnValue;
    }

    @Column(name="TABLE_KEY_VALUE")
    public String getTableKeyValue() {
        return tableKeyValue;
    }

    public void setTableKeyValue(String tableKeyValue) {
        this.tableKeyValue = tableKeyValue;
    }

    @Column(name="FIDELITY_TYPE")
    public Integer getFidelityType() {
        return fidelityType;
    }

    public void setFidelityType(Integer fidelityType) {
        this.fidelityType = fidelityType;
    }

    @Column(name="LOG_OPERATE_ID")
    public Long getLogOperateId() {
        return logOperateId;
    }

    public void setLogOperateId(Long logOperateId) {
        this.logOperateId = logOperateId;
    }

    @Id
    @Column(name="OPERATE_DETAIL_ID")
    @GeneratedValue(strategy = GenerationType.TABLE,generator="generator_normal")
    @TableGenerator(
        name = "generator_normal",
        table = "GLB_GENERATOR_KEY",
        pkColumnName = "GEN_KEY",
        valueColumnName = "GEN_VALUE",
        pkColumnValue = "LOG_OPERATE_DETAIL",
        allocationSize=1
    )
    public Long getOperateDetailId() {
        return operateDetailId;
    }

    public void setOperateDetailId(Long operateDetailId) {
        this.operateDetailId = operateDetailId;
    }

    @Column(name="COLUMN_ID")
    public Long getColumnId() {
        return columnId;
    }

    public void setColumnId(Long columnId) {
        this.columnId = columnId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof LogOperateDetailEntity)) return false;
        final LogOperateDetailEntity other = (LogOperateDetailEntity) o;
        if (columnValue == null) {
            if (other.columnValue != null) return false;
        } else if (!columnValue.equals(other.columnValue)) {
            return false;
        }
        if (tableKeyValue == null) {
            if (other.tableKeyValue != null) return false;
        } else if (!tableKeyValue.equals(other.tableKeyValue)) {
            return false;
        }
        if (fidelityType == null) {
            if (other.fidelityType != null) return false;
        } else if (!fidelityType.equals(other.fidelityType)) {
            return false;
        }
        if (logOperateId == null) {
            if (other.logOperateId != null) return false;
        } else if (!logOperateId.equals(other.logOperateId)) {
            return false;
        }
        if (operateDetailId == null) {
            if (other.operateDetailId != null) return false;
        } else if (!operateDetailId.equals(other.operateDetailId)) {
            return false;
        }
        if (columnId == null) {
            if (other.columnId != null) return false;
        } else if (!columnId.equals(other.columnId)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int njlrst = 17;
        njlrst = 31 * njlrst + (columnValue == null ? 0 : columnValue.hashCode());
        njlrst = 31 * njlrst + (tableKeyValue == null ? 0 : tableKeyValue.hashCode());
        njlrst = 31 * njlrst + (fidelityType == null ? 0 : fidelityType.hashCode());
        njlrst = 31 * njlrst + (logOperateId == null ? 0 : logOperateId.hashCode());
        njlrst = 31 * njlrst + (operateDetailId == null ? 0 : operateDetailId.hashCode());
        njlrst = 31 * njlrst + (columnId == null ? 0 : columnId.hashCode());
        return njlrst;
    }

}